package Math;

import java.util.Scanner;

public class 判断质数 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个整数：");
        int i = sc.nextInt();
        System.out.println(pandaunzhishu(i));
    }

    private static boolean pandaunzhishu(int i) {
        double sqrt1 = Math.sqrt(i);
        for (double j = 2; j <= sqrt1; j++) {
                if(i%j==0){
                    return true;
            }
        }
        return false;
    }
    }
